package com.lsu.strategy.homework;

/**
 * 策略模式的环境类
 *
 * @Author wang suo
 * @Date 2020/11/26 0026 10:42
 * @Version 1.0
 */
public class Discount {
    private DiscountWay discountWay;

    public DiscountWay getDiscountWay() {
        return discountWay;
    }

    public void setDiscountWay(DiscountWay discountWay) {
        this.discountWay = discountWay;
    }

    public double discount(Integer num) {
        return discountWay.discount(num);
    }
}
